package com.zy.chapter6

/**
 * @author: zhaoyi
 * @create: 2020-06-11 21:35
 * @description: 测试相等
 **/
class EqualData(val name: String) {

  override def equals(obj: Any): Boolean = {
    obj match {
      case e: EqualData => this.name.equals(e.name)
      case _ => false
    }
  }
}
